package com.kfm.base.string;

public class Demo02 {

    public static void main(String[] args) {
        /*
            字符串不可变, 字符串内容存储内容的元素是 final 修饰的所以不可变
         */
        String str = "hello";
        String str1 = "hello";

        System.out.println(str == str1);

        // 创建了几个对象
        String s1 = new String("abc");

        byte b = 123;
        Character c = '你';

        System.out.println("你".getBytes().length);

        String s = "1";
        for (int i = 0; i < 10; i++) {
            s += i;
        }
    }
}
